﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;

public partial class Admin_Article_ArticleCategoyList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Delete();
            BindData();
        }
    }

    protected void BindData()
    {
        
        MatchIns.BLL.TArticleCategory bll = new MatchIns.BLL.TArticleCategory();
        List<MatchIns.Model.TArticleCategory> ds = new List<MatchIns.Model.TArticleCategory>();
        bll.GetList(0, bll.GetList(), ds, "");
        gv.DataSource = ds;
        gv.DataBind();
    }

    protected void Delete()
    {
        int categoryId;
        if (int.TryParse(Request.QueryString["categoryId"], out categoryId))
            new MatchIns.BLL.TArticleCategory().Delete(categoryId);
    }
}
